{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Spatial Joins\n",
    "\n",
    "A *spatial join* uses [binary predicates](http://shapely.readthedocs.io/en/latest/manual.html#binary-predicates) \n",
    "such as `intersects` and `crosses` to combine two `GeoDataFrames` based on the spatial relationship \n",
    "between their geometries.\n",
    "\n",
    "A common use case might be a spatial join between a point layer and a polygon layer where you want to retain the point geometries and grab the attributes of the intersecting polygons.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:04.391570Z",
     "start_time": "2017-12-15T21:26:04.361570Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://web.natur.cuni.cz/~langhamr/lectures/vtfg1/mapinfo_1/about_gis/Image23.gif\"/>"
      ],
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from IPython.core.display import Image \n",
    "Image(url='https://web.natur.cuni.cz/~langhamr/lectures/vtfg1/mapinfo_1/about_gis/Image23.gif') "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "## Types of spatial joins\n",
    "\n",
    "We currently support the following methods of spatial joins. We refer to the *left_df* and *right_df* which are the correspond to the two dataframes passed in as args.\n",
    "\n",
    "### Left outer join\n",
    "\n",
    "In a LEFT OUTER JOIN (`how='left'`), we keep *all* rows from the left and duplicate them if necessary to represent multiple hits between the two dataframes. We retain attributes of the right if they intersect and lose right rows that don't intersect. A left outer join implies that we are interested in retaining the geometries of the left. \n",
    "\n",
    "This is equivalent to the PostGIS query:\n",
    "```\n",
    "SELECT pts.geom, pts.id as ptid, polys.id as polyid  \n",
    "FROM pts\n",
    "LEFT OUTER JOIN polys\n",
    "ON ST_Intersects(pts.geom, polys.geom);\n",
    "\n",
    "                    geom                    | ptid | polyid \n",
    "--------------------------------------------+------+--------\n",
    " 010100000040A9FBF2D88AD03F349CD47D796CE9BF |    4 |     10\n",
    " 010100000048EABE3CB622D8BFA8FBF2D88AA0E9BF |    3 |     10\n",
    " 010100000048EABE3CB622D8BFA8FBF2D88AA0E9BF |    3 |     20\n",
    " 0101000000F0D88AA0E1A4EEBF7052F7E5B115E9BF |    2 |     20\n",
    " 0101000000818693BA2F8FF7BF4ADD97C75604E9BF |    1 |       \n",
    "(5 rows)\n",
    "```\n",
    "\n",
    "### Right outer join\n",
    "\n",
    "In a RIGHT OUTER JOIN (`how='right'`), we keep *all* rows from the right and duplicate them if necessary to represent multiple hits between the two dataframes. We retain attributes of the left if they intersect and lose left rows that don't intersect. A right outer join implies that we are interested in retaining the geometries of the right. \n",
    "\n",
    "This is equivalent to the PostGIS query:\n",
    "```\n",
    "SELECT polys.geom, pts.id as ptid, polys.id as polyid  \n",
    "FROM pts\n",
    "RIGHT OUTER JOIN polys\n",
    "ON ST_Intersects(pts.geom, polys.geom);\n",
    "\n",
    "  geom    | ptid | polyid \n",
    "----------+------+--------\n",
    " 01...9BF |    4 |     10\n",
    " 01...9BF |    3 |     10\n",
    " 02...7BF |    3 |     20\n",
    " 02...7BF |    2 |     20\n",
    " 00...5BF |      |     30\n",
    "(5 rows)\n",
    "```\n",
    "\n",
    "### Inner join\n",
    "\n",
    "In an INNER JOIN (`how='inner'`), we keep rows from the right and left only where their binary predicate is `True`. We duplicate them if necessary to represent multiple hits between the two dataframes. We retain attributes of the right and left only if they intersect and lose all rows that do not. An inner join implies that we are interested in retaining the geometries of the left. \n",
    "\n",
    "This is equivalent to the PostGIS query:\n",
    "```\n",
    "SELECT pts.geom, pts.id as ptid, polys.id as polyid  \n",
    "FROM pts\n",
    "INNER JOIN polys\n",
    "ON ST_Intersects(pts.geom, polys.geom);\n",
    "\n",
    "                    geom                    | ptid | polyid \n",
    "--------------------------------------------+------+--------\n",
    " 010100000040A9FBF2D88AD03F349CD47D796CE9BF |    4 |     10\n",
    " 010100000048EABE3CB622D8BFA8FBF2D88AA0E9BF |    3 |     10\n",
    " 010100000048EABE3CB622D8BFA8FBF2D88AA0E9BF |    3 |     20\n",
    " 0101000000F0D88AA0E1A4EEBF7052F7E5B115E9BF |    2 |     20\n",
    "(4 rows) \n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Spatial Joins between two GeoDataFrames\n",
    "\n",
    "Let's take a look at how we'd implement these using `GeoPandas`. First, load up the NYC test data into `GeoDataFrames`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:07.191542Z",
     "start_time": "2017-12-15T21:26:04.391570Z"
    }
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "from shapely.geometry import Point\n",
    "from geopandas import datasets, GeoDataFrame, read_file\n",
    "from geopandas.tools import overlay\n",
    "\n",
    "# NYC Boros\n",
    "zippath = datasets.get_path('nybb')\n",
    "polydf = read_file(zippath)\n",
    "\n",
    "# Generate some points\n",
    "b = [int(x) for x in polydf.total_bounds]\n",
    "N = 8\n",
    "pointdf = GeoDataFrame([\n",
    "    {'geometry': Point(x, y), 'value1': x + y, 'value2': x - y}\n",
    "    for x, y in zip(range(b[0], b[2], int((b[2] - b[0]) / N)),\n",
    "                    range(b[1], b[3], int((b[3] - b[1]) / N)))])\n",
    "\n",
    "# Make sure they're using the same projection reference\n",
    "pointdf.crs = polydf.crs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:07.211542Z",
     "start_time": "2017-12-15T21:26:07.191542Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geometry</th>\n",
       "      <th>value1</th>\n",
       "      <th>value2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>POINT (913175 120121)</td>\n",
       "      <td>1033296</td>\n",
       "      <td>793054</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>POINT (932450 139211)</td>\n",
       "      <td>1071661</td>\n",
       "      <td>793239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>POINT (951725 158301)</td>\n",
       "      <td>1110026</td>\n",
       "      <td>793424</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>POINT (971000 177391)</td>\n",
       "      <td>1148391</td>\n",
       "      <td>793609</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>POINT (990275 196481)</td>\n",
       "      <td>1186756</td>\n",
       "      <td>793794</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>POINT (1009550 215571)</td>\n",
       "      <td>1225121</td>\n",
       "      <td>793979</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>POINT (1028825 234661)</td>\n",
       "      <td>1263486</td>\n",
       "      <td>794164</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>POINT (1048100 253751)</td>\n",
       "      <td>1301851</td>\n",
       "      <td>794349</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>POINT (1067375 272841)</td>\n",
       "      <td>1340216</td>\n",
       "      <td>794534</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 geometry   value1  value2\n",
       "0   POINT (913175 120121)  1033296  793054\n",
       "1   POINT (932450 139211)  1071661  793239\n",
       "2   POINT (951725 158301)  1110026  793424\n",
       "3   POINT (971000 177391)  1148391  793609\n",
       "4   POINT (990275 196481)  1186756  793794\n",
       "5  POINT (1009550 215571)  1225121  793979\n",
       "6  POINT (1028825 234661)  1263486  794164\n",
       "7  POINT (1048100 253751)  1301851  794349\n",
       "8  POINT (1067375 272841)  1340216  794534"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pointdf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:07.921534Z",
     "start_time": "2017-12-15T21:26:07.211542Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>BoroCode</th>\n",
       "      <th>BoroName</th>\n",
       "      <th>Shape_Leng</th>\n",
       "      <th>Shape_Area</th>\n",
       "      <th>geometry</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5</td>\n",
       "      <td>Staten Island</td>\n",
       "      <td>330470.010332</td>\n",
       "      <td>1.623820e+09</td>\n",
       "      <td>(POLYGON ((970217.0223999023 145643.3322143555...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4</td>\n",
       "      <td>Queens</td>\n",
       "      <td>896344.047763</td>\n",
       "      <td>3.045213e+09</td>\n",
       "      <td>(POLYGON ((1029606.076599121 156073.8142089844...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>Brooklyn</td>\n",
       "      <td>741080.523166</td>\n",
       "      <td>1.937479e+09</td>\n",
       "      <td>(POLYGON ((1021176.479003906 151374.7969970703...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>Manhattan</td>\n",
       "      <td>359299.096471</td>\n",
       "      <td>6.364715e+08</td>\n",
       "      <td>(POLYGON ((981219.0557861328 188655.3157958984...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2</td>\n",
       "      <td>Bronx</td>\n",
       "      <td>464392.991824</td>\n",
       "      <td>1.186925e+09</td>\n",
       "      <td>(POLYGON ((1012821.805786133 229228.2645874023...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   BoroCode       BoroName     Shape_Leng    Shape_Area  \\\n",
       "0         5  Staten Island  330470.010332  1.623820e+09   \n",
       "1         4         Queens  896344.047763  3.045213e+09   \n",
       "2         3       Brooklyn  741080.523166  1.937479e+09   \n",
       "3         1      Manhattan  359299.096471  6.364715e+08   \n",
       "4         2          Bronx  464392.991824  1.186925e+09   \n",
       "\n",
       "                                            geometry  \n",
       "0  (POLYGON ((970217.0223999023 145643.3322143555...  \n",
       "1  (POLYGON ((1029606.076599121 156073.8142089844...  \n",
       "2  (POLYGON ((1021176.479003906 151374.7969970703...  \n",
       "3  (POLYGON ((981219.0557861328 188655.3157958984...  \n",
       "4  (POLYGON ((1012821.805786133 229228.2645874023...  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "polydf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:08.271531Z",
     "start_time": "2017-12-15T21:26:07.921534Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x4f1b0b8>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAS0AAAD8CAYAAAAi9vLQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFCxJREFUeJzt3X2QXXV9x/H3twQjtmgSwrNkEhSYQSpPEUEGH7AVpFat\nrQrDaKyMjGAZoRYKUp9rB4i2o9OpaAuDdVCJFVLbakMApQ/TgAnPT5EHFRMeEogIIwF5+PaP87vs\nybLLbu7uvXd/u+/XzJ09+7vn3PO759793nt+5+z5RGYiSbX4rUF3QJK2hkVLUlUsWpKqYtGSVBWL\nlqSqWLQkVWXMohURe0TEDyPitoi4NSI+WtoPiIhVEXFDRKyOiENay5wVEXdFxNqIOKrVfnBE3Fzu\n+3JERGmfHRGXlPZrImJha5klEXFnuS2ZzCcvqUKZ+YI3YFfgoDK9PfATYF/gcuCtpf0Y4Edlel/g\nRmA2sAi4G9im3HctcCgQwA9ay58MnF+mjwUuKdPzgHvKz7lleu5Yffbmzdv0vY35TSsz78/M68r0\nY8DtwO5AAi8ts70MuK9MvwP4dmY+mZk/Be4CDomIXYGXZuaqzEzgn4F3tpb5epn+F+DN5VvYUcDK\nzNyUmb8EVgJHj9VnSdPXrK2Zuey2HQhcA5wKrIiIL9DsZr6uzLY7sKq12LrS9lSZHt7eWeYXAJn5\ndET8Ctih3T7CMiOaP39+Lly4cGuelqQurVmz5qHM3LGf6xx30YqI3wG+C5yamY9GxF8Dp2XmdyPi\nPcAFwO/1qJ9j9e1E4ESABQsWsHr16kF0Q5pxIuLn/V7nuI4eRsS2NAXr4sy8tDQvATrT3wE6A/Hr\ngT1ai7+8tK0v08Pbt1gmImbR7G4+/AKPtYXM/FpmLs7MxTvu2NeiL6nPx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l5S6u5H9tgVDPtmxaZeUFmHpyZrwd+SRM2\nO2JQRzb5jQ+X6TU0Yyt7M8Ggjsy8APh34OxOHzLzwcx8JjOfBf6R5hvQFo83bF1d96GzDWgK5obW\nNpgFvItmDKqzvSZzGzwAbNta5kmaDw9KNuaGXj3n1jLblraHgYyIzuPtDzzRmam0Xwa8PzPvbm2P\n9eXnY8A3GeF1muj6e/W+K3ah+WB+GJgDPFi2/ctpPtA2sKVjGfYtaxK2QaffDwNzyrzDn8/oxtp/\nnG43ho50LKAZCJ1DEwJ7G7DjsHl3ZGgAeM+yQeeV34cPiB5T2j/CloORy8r0PJrB97k0gR8/pRng\n7PRh19Z6T6MJvYUmrbs9KH0Pow9Kj7cPe5V+3EtTsDpHS48Gru7hNtifMhDNyAPx5/XwOc8FXl3W\n3+n/WrYcCL+8TM8p63/XsG0xC5hfprelCRf+cA/W36v33VzKgZhy33eAf2NoIH555zUo9/9WWfee\nk7gN5pbpea0+tAfiTx7zb3jQRWQAReu/aQrUjcCbS9td5cXc4hAzzXjGraXtOuAPW4+zmGZ86m7g\n7xk69Pzi8kLcVd5g7Rf8g6V9c3kztPvwDZpD2TfRHNFpF7Gzy3rWUo4WTbAPm2n+eO7trL/cd1Hn\nDdhqm5RtQPNpfT/Np/zTNONpfwZcSXMY/IrOG7lHz/mx1rrXAScABzF0ysGDwC5l/r9iaPjgucP6\nNONva8prdCvwJYaKy2Suv1fvu8doPiieKn34y/L4nVMerhz2GryRJrSm/X6YyDa4q9z+tNW+Z5n3\nrrLs7LH+hj0jXlJVZtyYlqS6WbQkVcWiJakqFi1JVbFoSaqKRUtSVSxakqpi0ZJUlf8H8UztvyKh\nSMoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x4efcc88>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pointdf.plot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:10.561508Z",
     "start_time": "2017-12-15T21:26:08.271531Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x12991208>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAS0AAAD8CAYAAAAi9vLQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXd4m9XZh+8jybK8955JHGdvZ0BYAUqAMAshtMxSSgst\nhZZCgdJCKaOlLauFr6WQMsqGACEkQAiBJCRx9nScON57b1vWOt8fkhXvKQ/Z574uX5GOzvvqKIl+\nPuN5np+QUqJQKBTugmakB6BQKBT9QYmWQqFwK5RoKRQKt0KJlkKhcCuUaCkUCrdCiZZCoXArehUt\nIUScEGKzECJNCHFUCHGXo32uEGKnEOKAEGKPEGJRm2seEEKcFEIcF0Isb9O+QAhx2PHa80II4Wj3\nFEK862hPFUIktrnmJiFEhuPnJld+eIVC4YZIKXv8AaKA+Y7HfsAJYDrwJXCRo/1i4BvH4+nAQcAT\nmABkAlrHa7uAJYAANrS5/g7gX47H1wLvOh4HA1mOP4Mcj4N6G7P6UT/qZ+z+9DrTklIWSyn3OR7X\nA8eAGEAC/o5uAUCR4/HlwDtSyhYpZTZwElgkhIgC/KWUO6WUEngduKLNNa85Hn8AnOeYhS0HNkop\nq6SU1cBG4MLexqxQKMYuuv50dizb5gGpwN3AF0KIv2FfZp7u6BYD7GxzWYGjzex43LG99Zp8ACml\nRQhRC4S0be/imi4JDQ2ViYmJ/flYCoVigOzdu7dCShk2nO/ZZ9ESQvgCHwJ3SynrhBCPAb+SUn4o\nhLgGeAU4f4jG2dvYbgNuA4iPj2fPnj0jMQyFYtwhhMgd7vfs0+mhEMIDu2C9KaVc42i+CWh9/D7Q\nuhFfCMS1uTzW0VboeNyxvd01Qggd9uVmZQ/3aoeU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3FTgN8ADDI0JmgYV\nsfkwDGkD59yHgbMi0hVlV8IGwzLenrQQkc0iskhElgD/Al6DwoE6xMdvHNB0J35sZT4lBuoQkc3A\nH4ANQQcR6ReR/4nIe8Cz+CegIfUlZBWtQ7AB3mGeiGxQA9xHPiRc2jboAyZEx5zH3zzQ2JgnynXO\n0TETNG8AEOdcqG8hMBi5V/NfAB4UkUORPY7p3zPA8xRop1Lll6vfKc34G/MAUAf0q+2vxt/QTjCU\nFSSeslKwQdB7AKjTssnzGZ6R3h/H2kZ+pmM2fiC0Dh8Edj/QlCjbRH4AeK4atEF/JwdEl2n+lxg6\nGNmu6Qb84Hs9PuDHYfwAZ9BhZiT3a/igt+CjdceD0r0MPyh9qTrMUz3ewDusMFt6D7CrjDZYiA5E\nU3gg/vtlPOd64GaVH/TvZuhA+HZN16n8+xK2qAGmaXoCPrjww2WQX65+V49OxOi+XwG/Jz8Q/2Jo\nA91/mcqem6IN6jXdEOkQD8SvHfEarrYTqYLT+gveQe0F7tC8Hm3MIVPM+PGMfZr3MvCpqJ4cfnzq\nEPBj8lPPk7QherSDxQ2+WvPPaWeIdfgFfir7FfyMTuzENqicbnS2qEQdzuEvnjeCfN33s9ABo7xU\nbIC/Wx/H3+X/ix9P+zLwEn4afGfoyGU65zOR7KPAGuBW8p8c9APNWv6b5IcPBqf18eNvndpG+4Af\nkncuacovV787g79RhODJ67T+8MnDS4k2+Bg+aE3cH0qxQY9uX4zy52rZHj22dqRr2L6INwwjU4y7\nMS3DMLKNOS3DMDKFOS3DMDKFOS3DMDKFOS3DMDKFOS3DMDKFOS3DMDKFOS3DMDLF/wGms8Jolysl\nyQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x129caf98>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "polydf.plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Joins"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:12.951484Z",
     "start_time": "2017-12-15T21:26:10.561508Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geometry</th>\n",
       "      <th>value1</th>\n",
       "      <th>value2</th>\n",
       "      <th>index_right</th>\n",
       "      <th>BoroCode</th>\n",
       "      <th>BoroName</th>\n",
       "      <th>Shape_Leng</th>\n",
       "      <th>Shape_Area</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>POINT (913175 120121)</td>\n",
       "      <td>1033296</td>\n",
       "      <td>793054</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>POINT (932450 139211)</td>\n",
       "      <td>1071661</td>\n",
       "      <td>793239</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>Staten Island</td>\n",
       "      <td>330470.010332</td>\n",
       "      <td>1.623820e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>POINT (951725 158301)</td>\n",
       "      <td>1110026</td>\n",
       "      <td>793424</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>Staten Island</td>\n",
       "      <td>330470.010332</td>\n",
       "      <td>1.623820e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>POINT (971000 177391)</td>\n",
       "      <td>1148391</td>\n",
       "      <td>793609</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>POINT (990275 196481)</td>\n",
       "      <td>1186756</td>\n",
       "      <td>793794</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>POINT (1009550 215571)</td>\n",
       "      <td>1225121</td>\n",
       "      <td>793979</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>Queens</td>\n",
       "      <td>896344.047763</td>\n",
       "      <td>3.045213e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>POINT (1028825 234661)</td>\n",
       "      <td>1263486</td>\n",
       "      <td>794164</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>Bronx</td>\n",
       "      <td>464392.991824</td>\n",
       "      <td>1.186925e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>POINT (1048100 253751)</td>\n",
       "      <td>1301851</td>\n",
       "      <td>794349</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>POINT (1067375 272841)</td>\n",
       "      <td>1340216</td>\n",
       "      <td>794534</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 geometry   value1  value2  index_right  BoroCode  \\\n",
       "0   POINT (913175 120121)  1033296  793054          NaN       NaN   \n",
       "1   POINT (932450 139211)  1071661  793239          0.0       5.0   \n",
       "2   POINT (951725 158301)  1110026  793424          0.0       5.0   \n",
       "3   POINT (971000 177391)  1148391  793609          NaN       NaN   \n",
       "4   POINT (990275 196481)  1186756  793794          NaN       NaN   \n",
       "5  POINT (1009550 215571)  1225121  793979          1.0       4.0   \n",
       "6  POINT (1028825 234661)  1263486  794164          4.0       2.0   \n",
       "7  POINT (1048100 253751)  1301851  794349          NaN       NaN   \n",
       "8  POINT (1067375 272841)  1340216  794534          NaN       NaN   \n",
       "\n",
       "        BoroName     Shape_Leng    Shape_Area  \n",
       "0            NaN            NaN           NaN  \n",
       "1  Staten Island  330470.010332  1.623820e+09  \n",
       "2  Staten Island  330470.010332  1.623820e+09  \n",
       "3            NaN            NaN           NaN  \n",
       "4            NaN            NaN           NaN  \n",
       "5         Queens  896344.047763  3.045213e+09  \n",
       "6          Bronx  464392.991824  1.186925e+09  \n",
       "7            NaN            NaN           NaN  \n",
       "8            NaN            NaN           NaN  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from geopandas.tools import sjoin\n",
    "join_left_df = sjoin(pointdf, polydf, how=\"left\")\n",
    "join_left_df\n",
    "# Note the NaNs where the point did not intersect a boro"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:13.871475Z",
     "start_time": "2017-12-15T21:26:12.951484Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>index_left</th>\n",
       "      <th>value1</th>\n",
       "      <th>value2</th>\n",
       "      <th>BoroCode</th>\n",
       "      <th>BoroName</th>\n",
       "      <th>Shape_Leng</th>\n",
       "      <th>Shape_Area</th>\n",
       "      <th>geometry</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>index_right</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1071661.0</td>\n",
       "      <td>793239.0</td>\n",
       "      <td>5</td>\n",
       "      <td>Staten Island</td>\n",
       "      <td>330470.010332</td>\n",
       "      <td>1.623820e+09</td>\n",
       "      <td>(POLYGON ((970217.0223999023 145643.3322143555...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2.0</td>\n",
       "      <td>1110026.0</td>\n",
       "      <td>793424.0</td>\n",
       "      <td>5</td>\n",
       "      <td>Staten Island</td>\n",
       "      <td>330470.010332</td>\n",
       "      <td>1.623820e+09</td>\n",
       "      <td>(POLYGON ((970217.0223999023 145643.3322143555...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5.0</td>\n",
       "      <td>1225121.0</td>\n",
       "      <td>793979.0</td>\n",
       "      <td>4</td>\n",
       "      <td>Queens</td>\n",
       "      <td>896344.047763</td>\n",
       "      <td>3.045213e+09</td>\n",
       "      <td>(POLYGON ((1029606.076599121 156073.8142089844...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6.0</td>\n",
       "      <td>1263486.0</td>\n",
       "      <td>794164.0</td>\n",
       "      <td>2</td>\n",
       "      <td>Bronx</td>\n",
       "      <td>464392.991824</td>\n",
       "      <td>1.186925e+09</td>\n",
       "      <td>(POLYGON ((1012821.805786133 229228.2645874023...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3</td>\n",
       "      <td>Brooklyn</td>\n",
       "      <td>741080.523166</td>\n",
       "      <td>1.937479e+09</td>\n",
       "      <td>(POLYGON ((1021176.479003906 151374.7969970703...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>Manhattan</td>\n",
       "      <td>359299.096471</td>\n",
       "      <td>6.364715e+08</td>\n",
       "      <td>(POLYGON ((981219.0557861328 188655.3157958984...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             index_left     value1    value2  BoroCode       BoroName  \\\n",
       "index_right                                                             \n",
       "0                   1.0  1071661.0  793239.0         5  Staten Island   \n",
       "0                   2.0  1110026.0  793424.0         5  Staten Island   \n",
       "1                   5.0  1225121.0  793979.0         4         Queens   \n",
       "4                   6.0  1263486.0  794164.0         2          Bronx   \n",
       "2                   NaN        NaN       NaN         3       Brooklyn   \n",
       "3                   NaN        NaN       NaN         1      Manhattan   \n",
       "\n",
       "                Shape_Leng    Shape_Area  \\\n",
       "index_right                                \n",
       "0            330470.010332  1.623820e+09   \n",
       "0            330470.010332  1.623820e+09   \n",
       "1            896344.047763  3.045213e+09   \n",
       "4            464392.991824  1.186925e+09   \n",
       "2            741080.523166  1.937479e+09   \n",
       "3            359299.096471  6.364715e+08   \n",
       "\n",
       "                                                      geometry  \n",
       "index_right                                                     \n",
       "0            (POLYGON ((970217.0223999023 145643.3322143555...  \n",
       "0            (POLYGON ((970217.0223999023 145643.3322143555...  \n",
       "1            (POLYGON ((1029606.076599121 156073.8142089844...  \n",
       "4            (POLYGON ((1012821.805786133 229228.2645874023...  \n",
       "2            (POLYGON ((1021176.479003906 151374.7969970703...  \n",
       "3            (POLYGON ((981219.0557861328 188655.3157958984...  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "join_right_df = sjoin(pointdf, polydf, how=\"right\")\n",
    "join_right_df\n",
    "# Note Staten Island is repeated"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:13.961474Z",
     "start_time": "2017-12-15T21:26:13.881475Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geometry</th>\n",
       "      <th>value1</th>\n",
       "      <th>value2</th>\n",
       "      <th>index_right</th>\n",
       "      <th>BoroCode</th>\n",
       "      <th>BoroName</th>\n",
       "      <th>Shape_Leng</th>\n",
       "      <th>Shape_Area</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>POINT (932450 139211)</td>\n",
       "      <td>1071661</td>\n",
       "      <td>793239</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>Staten Island</td>\n",
       "      <td>330470.010332</td>\n",
       "      <td>1.623820e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>POINT (951725 158301)</td>\n",
       "      <td>1110026</td>\n",
       "      <td>793424</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>Staten Island</td>\n",
       "      <td>330470.010332</td>\n",
       "      <td>1.623820e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>POINT (1009550 215571)</td>\n",
       "      <td>1225121</td>\n",
       "      <td>793979</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>Queens</td>\n",
       "      <td>896344.047763</td>\n",
       "      <td>3.045213e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>POINT (1028825 234661)</td>\n",
       "      <td>1263486</td>\n",
       "      <td>794164</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>Bronx</td>\n",
       "      <td>464392.991824</td>\n",
       "      <td>1.186925e+09</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 geometry   value1  value2  index_right  BoroCode  \\\n",
       "1   POINT (932450 139211)  1071661  793239            0         5   \n",
       "2   POINT (951725 158301)  1110026  793424            0         5   \n",
       "5  POINT (1009550 215571)  1225121  793979            1         4   \n",
       "6  POINT (1028825 234661)  1263486  794164            4         2   \n",
       "\n",
       "        BoroName     Shape_Leng    Shape_Area  \n",
       "1  Staten Island  330470.010332  1.623820e+09  \n",
       "2  Staten Island  330470.010332  1.623820e+09  \n",
       "5         Queens  896344.047763  3.045213e+09  \n",
       "6          Bronx  464392.991824  1.186925e+09  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "join_inner_df = sjoin(pointdf, polydf, how=\"inner\")\n",
    "join_inner_df\n",
    "# Note the lack of NaNs; dropped anything that didn't intersect"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We're not limited to using the `intersection` binary predicate. Any of the `Shapely` geometry methods that return a Boolean can be used by specifying the `op` kwarg."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2017-12-15T21:26:14.191472Z",
     "start_time": "2017-12-15T21:26:13.961474Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geometry</th>\n",
       "      <th>value1</th>\n",
       "      <th>value2</th>\n",
       "      <th>index_right</th>\n",
       "      <th>BoroCode</th>\n",
       "      <th>BoroName</th>\n",
       "      <th>Shape_Leng</th>\n",
       "      <th>Shape_Area</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>POINT (913175 120121)</td>\n",
       "      <td>1033296</td>\n",
       "      <td>793054</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>POINT (932450 139211)</td>\n",
       "      <td>1071661</td>\n",
       "      <td>793239</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>Staten Island</td>\n",
       "      <td>330470.010332</td>\n",
       "      <td>1.623820e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>POINT (951725 158301)</td>\n",
       "      <td>1110026</td>\n",
       "      <td>793424</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>Staten Island</td>\n",
       "      <td>330470.010332</td>\n",
       "      <td>1.623820e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>POINT (971000 177391)</td>\n",
       "      <td>1148391</td>\n",
       "      <td>793609</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>POINT (990275 196481)</td>\n",
       "      <td>1186756</td>\n",
       "      <td>793794</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>POINT (1009550 215571)</td>\n",
       "      <td>1225121</td>\n",
       "      <td>793979</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>Queens</td>\n",
       "      <td>896344.047763</td>\n",
       "      <td>3.045213e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>POINT (1028825 234661)</td>\n",
       "      <td>1263486</td>\n",
       "      <td>794164</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>Bronx</td>\n",
       "      <td>464392.991824</td>\n",
       "      <td>1.186925e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>POINT (1048100 253751)</td>\n",
       "      <td>1301851</td>\n",
       "      <td>794349</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>POINT (1067375 272841)</td>\n",
       "      <td>1340216</td>\n",
       "      <td>794534</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 geometry   value1  value2  index_right  BoroCode  \\\n",
       "0   POINT (913175 120121)  1033296  793054          NaN       NaN   \n",
       "1   POINT (932450 139211)  1071661  793239          0.0       5.0   \n",
       "2   POINT (951725 158301)  1110026  793424          0.0       5.0   \n",
       "3   POINT (971000 177391)  1148391  793609          NaN       NaN   \n",
       "4   POINT (990275 196481)  1186756  793794          NaN       NaN   \n",
       "5  POINT (1009550 215571)  1225121  793979          1.0       4.0   \n",
       "6  POINT (1028825 234661)  1263486  794164          4.0       2.0   \n",
       "7  POINT (1048100 253751)  1301851  794349          NaN       NaN   \n",
       "8  POINT (1067375 272841)  1340216  794534          NaN       NaN   \n",
       "\n",
       "        BoroName     Shape_Leng    Shape_Area  \n",
       "0            NaN            NaN           NaN  \n",
       "1  Staten Island  330470.010332  1.623820e+09  \n",
       "2  Staten Island  330470.010332  1.623820e+09  \n",
       "3            NaN            NaN           NaN  \n",
       "4            NaN            NaN           NaN  \n",
       "5         Queens  896344.047763  3.045213e+09  \n",
       "6          Bronx  464392.991824  1.186925e+09  \n",
       "7            NaN            NaN           NaN  \n",
       "8            NaN            NaN           NaN  "
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sjoin(pointdf, polydf, how=\"left\", op=\"within\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
